package com.test.google.app.util;

import com.google.appengine.api.memcache.Expiration;
import com.google.appengine.api.memcache.MemcacheService;
import com.google.appengine.api.memcache.MemcacheServiceFactory;

public class GaeMemcacheUtil {
	
	private static MemcacheService service = MemcacheServiceFactory.getMemcacheService();
	
	public static void del(Object key) {
		service.delete(key);
	}
	
	public static Object get(Object key) {
		return service.get(key);
	}
	
	public static void put(Object key, Object value) {
		service.put(key, value);
	}
	
	public static void put(Object key, Object value, int delay) {
		service.put(key, value, Expiration.byDeltaMillis(delay));
	}

}
